This invention relates to an arithmetic unit and an arithmetic processing method suitable for use with a portable telephone set with a video game function wherein an arbitrary game character is plotted as a three-dimensional video or a like apparatus.
In recent years, use of a portable telephone unit having an information search function or a video game function in addition to a telephone function has been and is progressively increasing in the field of communication processing. Meanwhile, in the field of computer graphics processing, plotting of an object in a three-dimensional video has been and is increasing. Usually, a three-dimensional video is represented using triangles. This is because a triangle allows a parameter such as a color value (P(X, Y)) of a pixel therein can be represented in such a simple expression as given below:
P(X,Y)=dP/dX(Xxe2x88x92X0)+dP/dY(Yxe2x88x92Y0)+P0 
This arises from the fact that with use of a gradient in the X direction and a gradient in the Y direction of a parameter with respect to a start point given by a certain vertex (coordinates: X0, Y0, parameter P0) of a triangle, a parameter of a pixel in the inside of the triangle can be linearly interpolated. As a parameter for a pixel, many parameters including color (R, G, B, A) values, a Z value, texture coordinates (S, T, Q) and a FOG coefficient are available. Usually, such parameters as mentioned above are subjected to interpolation operation in response to a clock signal and calculated in parallel to each other by arithmetic units independent of each other in order to achieve high speed operation.
The texture coordinates (S, T, Q) are composed of homogeneous coordinates (S, T) and a homogeneous term Q of the texture data. The homogenous term Q is, in short, a parameter like a scaling factor, and coordinates of the UV coordinate system of the actual texture buffer, that is, the texture coordinate data (U, V), are values obtained by multiplying xe2x80x9cS/Qxe2x80x9d and xe2x80x9cT/Qxe2x80x9d, which are quotients by division of the homogeneous coordinates (S, T) by the homogeneous term Q, by the texture sizes USIZE and VSIZE, respectively. For example, perspective correct texture mapping can be performed by linearly interpolating the homogeneous term Q.
However, in a conventional desk-top personal computer, stationary game machine and so forth of the commercial power supply driven type, in order to plot an arbitrary object in a three-dimensional video, even where some parameter or parameters are not used, a clock signal is supplied continuously to the arithmetic unit to perform linear interpolation operation of the parameters of pixels.
However, if such a clock supplying system as just described is applied as it is to a mobile personal computer, a PDA (Personal Digital Assistant), a portable game machine or the like of the battery driven type, then even where some parameter or parameters is/are not used, linear interpolation operation for the parameter or parameters is performed.
Particularly when the circuit configuration is such that a plurality of pixels are scanned at a time by parallel arithmetic units, since the number of opportunities of charging and discharging by a clock wiring line is great as much, power is consumed wastefully and the battery may be used up in a short time. Further, in order to suppress heat generation of a circuit board on which ICs are mounted, an air-cooling fan must be provided in the potable terminal equipment mentioned above.
It is an object of the present invention to provide an arithmetic unit and an arithmetic processing method wherein, when a parameter for a pixel to be used to plot an arbitrary object in a three-dimensional video is to be linearly interpolated, an operation result value can be fixed in accordance with a gradient value of the parameter.
It is another object of the present invention to provide an arithmetic unit and an arithmetic processing method wherein power consumption arising from charging and discharging through a clock wiring line can be reduced.
In order to attain the objects described above, according to an aspect of the present invention, there is provided an arithmetic unit for linearly interpolating a parameter of a pixel to be used to plot an arbitrary object in a three-dimensional video based on coordinate values of a vertex of a polygon and gradient values of the parameters in an X direction and a Y direction, comprising arithmetic operation means for linearly interpolating a parameter of a pixel in a polygon based on coordinate values of a vertex of the polygon, a gradient value of the parameter in an X direction and a gradient value of the parameter in a Y direction, clock supply means for supplying a clock signal to the arithmetic operation means, detection means for detecting a particular gradient value of the parameter in the X direction or/and the Y direction to produce a parameter gradient value detection signal, and control means for receiving the parameter gradient value detection signal from the detection means and controlling the clock supply means in response to the parameter gradient value detection signal.
In the arithmetic unit, when a parameter of a pixel to be used to plot an arbitrary object in a three-dimensional video is to be linearly interpolated based on coordinate values of a vertex of a polygon and gradient values of the parameters in an X direction and a Y direction, the clock signal is supplied from the clock supply means to the arithmetic operation means through the control means. The arithmetic operation means linearly interpolates the parameter of the pixel in the polygon based on the coordinate values of the vertex of the polygon, the gradient value of the parameter in the X direction and the gradient value of the parameter in the Y direction.
Meanwhile, the detection means detects a particular gradient value of the parameter in the X direction or/and the Y direction to produce a parameter gradient value detection signal. The parameter gradient value detection signal is outputted from the detection means to the control means. The control means receives the parameter gradient value detection signal from the detection means and controls the clock supply means in response to the parameter gradient value detection signal.
For example, when such a particular gradient value of the parameter as the gradient value of the parameter in the X direction of xe2x80x9c0xe2x80x9d and/or the gradient value of the parameter in the Y direction of xe2x80x9c0xe2x80x9d is detected and within a period within which such a value continues to be detected, the clock signal to be supplied to the arithmetic operation means is stopped.
Accordingly, the arithmetic unit can perform such output control that, when such a particular gradient value of the parameter as the gradient value of the parameter in the X direction of xe2x80x9c0xe2x80x9d and/or the gradient value of the parameter in the Y direction of xe2x80x9c0xe2x80x9d is detected and within a period within which such a value continues to be detected, the clock signal to be supplied to the arithmetic means is stopped and the calculation output value is fixed.
Further, since the power consumption by charging and discharging of a clock wiring line can be reduced when the gradient value of the parameter in the X direction of xe2x80x9c0xe2x80x9d and/or the gradient value of the parameter in the Y direction of xe2x80x9c0xe2x80x9d is detected and within a period within which the values continue to be detected, also heat generation of an IC chip in which the arithmetic unit is incorporated can be reduced. Consequently, the arithmetic unit can be applied sufficiently to an image processing apparatus of the battery driven type. Besides, such a part as a fan can be eliminated or a part of a lower quality can be used, and a less expensive IC package can be used. Therefore, the arithmetic unit contributes very much to reduction in price of the product.
According to another aspect of the present invention, there is provided an arithmetic processing method wherein a parameter of a pixel to be used to plot an arbitrary object in a three-dimensional video is calculated by linear interpolation calculation based on coordinate values of a vertex of a polygon, a gradient value of the parameter in an X direction, a gradient value of the parameter in a Y direction and a clock signal, comprising the steps of detecting a particular gradient value of the parameter in the X direction or/and the Y direction, and stopping, when the particular gradient value of the parameter is detected, supply of the clock signal thereby to fix an output value relating to the linear interpolation calculation.
With the arithmetic processing method, when such a particular gradient value of the parameter as the gradient value of the parameter in the X direction of xe2x80x9c0xe2x80x9d and/or the gradient value of the parameter in the Y direction of xe2x80x9c0xe2x80x9d is detected and within a period within which such a value continues to be detected, the power consumption by charging and discharging of a clock wiring line can be reduced.
In this manner, the present invention can be applied suitably to a portable telephone set or a like apparatus having a video game function of plotting an arbitrary game character in a three-dimensional video.
The above and other objects, features and advantages of the present invention will become apparent from the following description and the appended claims, taken in conjunction with the accompanying drawings in which like parts or elements denoted by like reference symbols.